#ifndef _FCHEAT_STDIO_INCLUDED
#define _FCHEAT_STDIO_INCLUDED

typedef struct fcheat_file
{
  char *buf;
  unsigned char unget;
  uint8_t flags;
#define FCHEAT_SRD 0x0001
#define FCHEAT_SWR 0x0002
  int size;
  int len;
  int (*put)(char,FILE*);
  int (*get)(FILE*);
} fcheat_file;

#define FCHEAT_STATIC_FDEVOPENR(get) \
{0,0,FCHEAT_SRD,0,0,0,get}

#define FCHEAT_STATIC_FDEVOPENW(put) \
{0,0,FCHEAT_SWR,0,0,put,0}

#define FCHEAT_STATIC_FDEVOPENWR(put,get) \
{0,0,FCHEAT_SWR|FCHEAT_SRD,0,0,put,get}
#endif //_FCHEAT_STDIO_INCLUDED